package com.rpc.core;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author wjwei
 * 自定义自动配置类，在properties/yml中实现自动提示
 * 需要在启动时初始化到Spring上下文中
 */
@Configuration(proxyBeanMethods = false)
@ConfigurationProperties(prefix = "rpc.config")
public class RpcConfig {

    private String host;
    private Integer port;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }
}
